﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Solution.Business.Entities;

namespace Solution.Data
{
    public  class PaymentsDAC
    {
        SolutionEntities context = SolutionEntities.Context;
        public List<Payment> Payments_GetByTop(string Top, string Where, string Ord)
        {
            var list = context.Payments_GetByTop(Top, Where, Ord);
            return list.ToList();
        }

        public void Payments_Insert(Payment payment)
        {
            context.Payments_Insert(payment.Name, payment.Order, payment.Active, payment.PmPosition);
        }

        public void Payments_Update(Payment payment)
        {
            context.Payments_Update(payment.PmId, payment.Name, payment.Order, payment.Active, payment.PmPosition);
        }
    }
}
